package com.xunwulian.dubbo.service.impl;

import com.xunwulian.api.iface.ConfigAPI;
import com.xunwulian.base.dao.ConfigDao;
import com.xunwulian.base.entity.ConfigEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.alibaba.dubbo.config.annotation.Service;

@Service
public class ConfigApiImpl implements ConfigAPI {

    @Autowired
    private ConfigDao configDao;

    public ConfigApiImpl() {
    }


    @Override
    public ConfigEntity getByCode(String code) {
        return configDao.getByCode(code);
    }

    @Override
    public void save(ConfigEntity entity) {
        configDao.save(entity);
    }

    @Override
    public int updateByCode(ConfigEntity entity) {
        return configDao.updateByCode(entity);
    }
}
